//This class represents the data related to location of word being stored in location.
public class WordTile {
//	int hitFreq;							// no of times word is searched for.
	String word;				//actual word
	int docId;					//document no
	int paraId;					//paragraph no
	long paraLoc;				//paragraph location in collection file
	long wordLoc;				//word location in collection file
	
	public void display(){
		//System.out.println(""+hitFreq+" "+fileName+" "+paraNo+" "+paraLoc+" "+wordLoc); 
		//displaying data to test
		System.out.println("" + docId+ " "+paraId+" "+ paraLoc+" "+ wordLoc+" "+ word);
	}
	
	//constructor to build new object.
	WordTile(int docId,int paraId,long paraLoc,long wordLoc,String word){
		this.docId = docId;
		this.paraId = paraId;
		this.paraLoc = paraLoc;
		this.wordLoc = wordLoc;
		this.word = word;
	}
	
	//this is the format in which wordtile is stored in index files.
	public String toString(){
		return (docId+" "+paraId+" "+paraLoc+" "+wordLoc+" "+word);
	}
	
	String getWord(){
		return word;
	}
	
	int getdocId(){
		return docId;
	}
	
	int getparaId(){
		return paraId;
	}
	long getparaLoc(){
		return paraLoc;
	}
	long getwordLoc(){
		return wordLoc;
	}
}
